<%@ language=vbscript%>
<%
	Session("FormName")="F26"
%>
<!--#include file="..\CheckSession.inc"-->
<!--#include file="..\getFormName.inc"-->
<%
bdate=Request("bdate")
if bdate="" then
	bdate=date()
end if
%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft FrontPage 5.0">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</HEAD>
<LINK href="../styles/styles.css" type=text/css rel=STYLESHEET>
<script language=VBScript runat=server>
Function FormatDate(vDate)
	   If Not IsNull(vDate) Then
	        vM = Right("0" & Month(vDate), 2)
	        vD = Right("0" & Day(vDate), 2)
	        vY = Right("19" & Year(vDate), 4)
	        FormatDate = vD & "/" & vM & "/" & vY
	   End If
End Function
Function SaveDate(vDate)
		dim bvitri1
		dim bvitri2
	   vDate=trim(cstr(vDate))
	   bvitri1=instr(1,vDate,"/")
	   bMonth=left(vDate,bvitri1-1)
	   bvitri2=instr(bvitri1+1,vDate,"/")
	   Dim Temp
	   Temp=right(vDate,len(vDate)-bvitri1)
	   bDay=left(Temp,bvitri2-bvitri1-1)
	   bYear=right(vDate,len(vDate)-bvitri2)
       SaveDate=bDay+"/"+bMonth+"/"+bYear
End Function
Function Thu(strdate)
	bthu=weekday(strdate)
	select case bthu
		case 1
			Thu="Chủ Nhật"
		case 2
			Thu="Thứ Hai"
		case 3
			Thu="Thứ Ba"
		case 4
			Thu="Thứ Tư"
		case 5
			Thu="Thứ Năm"
		case 6
			Thu="Thứ Sáu"
		case 7
			Thu="Thứ Bảy"
	End select
End Function
</script>
<!--#include file="..\jvfunction.inc"-->
<SCRIPT LANGUAGE=javascript>
function chk_onclick(i,intsumrecord){
if (i==1 && intsumrecord==1){
if (frm.chk.checked){
	if (parent.laplich.frm.Noidung1.value == "" ){
		parent.laplich.frm.Thoigian1.value=frm.Thoigian.value;
		parent.laplich.frm.Thoigiankt1.value=frm.Thoigiankt.value;
		parent.laplich.frm.Noidung1.value=frm.Noidung.value;
		parent.laplich.frm.Thanhphan1.value=frm.Thanhphan.value;
		parent.laplich.frm.Diadiem1.value=frm.Diadiem.value;
		parent.laplich.frm.Ghichu1.value=frm.Ghichu.value;			
		parent.laplich.frm.IDDK1.value=frm.ID.value;	
	}
	else
	{
		if (parent.laplich.frm.Noidung2.value == "" ){
			parent.laplich.frm.Thoigian2.value=frm.Thoigian.value;
			parent.laplich.frm.Thoigiankt2.value=frm.Thoigiankt.value;
			parent.laplich.frm.Noidung2.value=frm.Noidung.value;
			parent.laplich.frm.Thanhphan2.value=frm.Thanhphan.value;
			parent.laplich.frm.Diadiem2.value=frm.Diadiem.value;
			parent.laplich.frm.Ghichu2.value=frm.Ghichu.value;
			parent.laplich.frm.IDDK2.value=frm.ID.value;
		}
		else{
			if (parent.laplich.frm.Noidung3.value == "" ){
				parent.laplich.frm.Thoigian3.value=frm.Thoigian.value;
				parent.laplich.frm.Thoigiankt3.value=frm.Thoigiankt.value;
				parent.laplich.frm.Noidung3.value=frm.Noidung.value;
				parent.laplich.frm.Thanhphan3.value=frm.Thanhphan.value;
				parent.laplich.frm.Diadiem3.value=frm.Diadiem.value;
				parent.laplich.frm.Ghichu3.value=frm.Ghichu.value;
				parent.laplich.frm.IDDK3.value=frm.ID.value;
			}
			else{
				if (parent.laplich.frm.Noidung4.value == "" ){
					parent.laplich.frm.Thoigian4.value=frm.Thoigian.value;
					parent.laplich.frm.Thoigiankt4.value=frm.Thoigiankt.value;
					parent.laplich.frm.Noidung4.value=frm.Noidung.value;
					parent.laplich.frm.Thanhphan4.value=frm.Thanhphan.value;
					parent.laplich.frm.Diadiem4.value=frm.Diadiem.value;
					parent.laplich.frm.Ghichu4.value=frm.Ghichu.value;
					parent.laplich.frm.IDDK4.value=frm.ID.value;
				}
				else{
					if (parent.laplich.frm.Noidung5.value == "" ){
						parent.laplich.frm.Thoigian5.value=frm.Thoigian.value;
						parent.laplich.frm.Thoigiankt5.value=frm.Thoigiankt.value;
						parent.laplich.frm.Noidung5.value=frm.Noidung.value;
						parent.laplich.frm.Thanhphan5.value=frm.Thanhphan.value;
						parent.laplich.frm.Diadiem5.value=frm.Diadiem.value;
						parent.laplich.frm.Ghichu5.value=frm.Ghichu.value;
						parent.laplich.frm.IDDK5.value=frm.ID.value;
					}
					else{
						if (parent.laplich.frm.Noidung6.value == "" ){
							parent.laplich.frm.Thoigian6.value=frm.Thoigian.value;
							parent.laplich.frm.Thoigiankt6.value=frm.Thoigiankt.value;
							parent.laplich.frm.Noidung6.value=frm.Noidung.value;
							parent.laplich.frm.Thanhphan6.value=frm.Thanhphan.value;
							parent.laplich.frm.Diadiem6.value=frm.Diadiem.value;
							parent.laplich.frm.Ghichu6.value=frm.Ghichu.value;
							parent.laplich.frm.IDDK6.value=frm.ID.value;
						}
						else{
							if (parent.laplich.frm.Noidung7.value == "" ){
								parent.laplich.frm.Thoigian7.value=frm.Thoigian.value;
								parent.laplich.frm.Thoigiankt7.value=frm.Thoigiankt.value;
								parent.laplich.frm.Noidung7.value=frm.Noidung.value;
								parent.laplich.frm.Thanhphan7.value=frm.Thanhphan.value;
								parent.laplich.frm.Diadiem7.value=frm.Diadiem.value;
								parent.laplich.frm.Ghichu7.value=frm.Ghichu.value;
								parent.laplich.frm.IDDK7.value=frm.ID.value;
							}
							else{
								if (parent.laplich.frm.Noidung8.value == "" ){
									parent.laplich.frm.Thoigian8.value=frm.Thoigian.value;
									parent.laplich.frm.Thoigiankt8.value=frm.Thoigiankt.value;
									parent.laplich.frm.Noidung8.value=frm.Noidung.value;
									parent.laplich.frm.Thanhphan8.value=frm.Thanhphan.value;
									parent.laplich.frm.Diadiem8.value=frm.Diadiem.value;
									parent.laplich.frm.Ghichu8.value=frm.Ghichu.value;
									parent.laplich.frm.IDDK8.value=frm.ID.value;
								}
								else{
									if (parent.laplich.frm.Noidung9.value == "" ){
										parent.laplich.frm.Thoigian9.value=frm.Thoigian.value;
										parent.laplich.frm.Thoigiankt9.value=frm.Thoigiankt.value;
										parent.laplich.frm.Noidung9.value=frm.Noidung.value;
										parent.laplich.frm.Thanhphan9.value=frm.Thanhphan.value;
										parent.laplich.frm.Diadiem9.value=frm.Diadiem.value;
										parent.laplich.frm.Ghichu9.value=frm.Ghichu.value;
										parent.laplich.frm.IDDK9.value=frm.ID.value;
									}
									else{
										if (parent.laplich.frm.Noidung10.value == "" ){
											parent.laplich.frm.Thoigian10.value=frm.Thoigian.value;
											parent.laplich.frm.Thoigiankt10.value=frm.Thoigiankt.value;
											parent.laplich.frm.Noidung10.value=frm.Noidung.value;
											parent.laplich.frm.Thanhphan10.value=frm.Thanhphan.value;
											parent.laplich.frm.Diadiem10.value=frm.Diadiem.value;
											parent.laplich.frm.Ghichu10.value=frm.Ghichu.value;
											parent.laplich.frm.IDDK10.value=frm.ID.value;
										}
										else{
											if (parent.laplich.frm.Noidung11.value == "" ){
												parent.laplich.frm.Thoigian11.value=frm.Thoigian.value;
												parent.laplich.frm.Thoigiankt11.value=frm.Thoigiankt.value;
												parent.laplich.frm.Noidung11.value=frm.Noidung.value;
												parent.laplich.frm.Thanhphan11.value=frm.Thanhphan.value;
												parent.laplich.frm.Diadiem11.value=frm.Diadiem.value;
												parent.laplich.frm.Ghichu11.value=frm.Ghichu.value;
												parent.laplich.frm.IDDK11.value=frm.ID.value;
											}
											else{
												if (parent.laplich.frm.Noidung12.value == "" ){
													parent.laplich.frm.Thoigian12.value=frm.Thoigian.value;
													parent.laplich.frm.Thoigiankt12.value=frm.Thoigiankt.value;
													parent.laplich.frm.Noidung12.value=frm.Noidung.value;
													parent.laplich.frm.Thanhphan12.value=frm.Thanhphan.value;
													parent.laplich.frm.Diadiem12.value=frm.Diadiem.value;
													parent.laplich.frm.Ghichu12.value=frm.Ghichu.value;
													parent.laplich.frm.IDDK12.value=frm.ID.value;
												}
												else{
													if (parent.laplich.frm.Noidung13.value == "" ){
														parent.laplich.frm.Thoigian13.value=frm.Thoigian.value;
														parent.laplich.frm.Thoigiankt13.value=frm.Thoigiankt.value;
														parent.laplich.frm.Noidung13.value=frm.Noidung.value;
														parent.laplich.frm.Thanhphan13.value=frm.Thanhphan.value;
														parent.laplich.frm.Diadiem13.value=frm.Diadiem.value;
														parent.laplich.frm.Ghichu13.value=frm.Ghichu.value;
														parent.laplich.frm.IDDK13.value=frm.ID.value;
													}
													else{
														if (parent.laplich.frm.Noidung14.value == "" ){
															parent.laplich.frm.Thoigian14.value=frm.Thoigian.value;
															parent.laplich.frm.Thoigiankt14.value=frm.Thoigiankt.value;
															parent.laplich.frm.Noidung14.value=frm.Noidung.value;
															parent.laplich.frm.Thanhphan14.value=frm.Thanhphan.value;
															parent.laplich.frm.Diadiem14.value=frm.Diadiem.value;
															parent.laplich.frm.Ghichu14.value=frm.Ghichu.value;
															parent.laplich.frm.IDDK14.value=frm.ID.value;
														}
														else{
															if (parent.laplich.frm.Noidung15.value == "" ){
																parent.laplich.frm.Thoigian15.value=frm.Thoigian.value;
																parent.laplich.frm.Thoigiankt15.value=frm.Thoigiankt.value;
																parent.laplich.frm.Noidung15.value=frm.Noidung.value;
																parent.laplich.frm.Thanhphan15.value=frm.Thanhphan.value;
																parent.laplich.frm.Diadiem15.value=frm.Diadiem.value;
																parent.laplich.frm.Ghichu15.value=frm.Ghichu.value;
																parent.laplich.frm.IDDK15.value=frm.ID.value;
															}
															else{
																if (parent.laplich.frm.Noidung16.value == "" ){
																	parent.laplich.frm.Thoigian16.value=frm.Thoigian.value;
																	parent.laplich.frm.Thoigiankt16.value=frm.Thoigiankt.value;
																	parent.laplich.frm.Noidung16.value=frm.Noidung.value;
																	parent.laplich.frm.Thanhphan16.value=frm.Thanhphan.value;
																	parent.laplich.frm.Diadiem16.value=frm.Diadiem.value;
																	parent.laplich.frm.Ghichu16.value=frm.Ghichu.value;
																	parent.laplich.frm.IDDK16.value=frm.ID.value;
																}		
															}
														}
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
}
else{
	if (parent.laplich.frm.IDDK1.value==frm.ID.value){
		parent.laplich.frm.Thoigian1.value="";
		parent.laplich.frm.Thoigiankt1.value="";
		parent.laplich.frm.Noidung1.value="";
		parent.laplich.frm.Thanhphan1.value="";
		parent.laplich.frm.Diadiem1.value="";
		parent.laplich.frm.Ghichu1.value="";			
	}
	else
	{
		if (parent.laplich.frm.IDDK2.value==frm.ID.value){
			parent.laplich.frm.Thoigian2.value="";
			parent.laplich.frm.Thoigiankt2.value="";
			parent.laplich.frm.Noidung2.value="";
			parent.laplich.frm.Thanhphan2.value="";
			parent.laplich.frm.Diadiem2.value="";
			parent.laplich.frm.Ghichu2.value="";
		}
		else{
			if (parent.laplich.frm.IDDK3.value==frm.ID.value){
				parent.laplich.frm.Thoigian3.value="";
				parent.laplich.frm.Thoigiankt3.value="";
				parent.laplich.frm.Noidung3.value="";
				parent.laplich.frm.Thanhphan3.value="";
				parent.laplich.frm.Diadiem3.value="";
				parent.laplich.frm.Ghichu3.value="";
			}
			else{
				if (parent.laplich.frm.IDDK4.value==frm.ID.value){
					parent.laplich.frm.Thoigian4.value="";
					parent.laplich.frm.Thoigiankt4.value="";
					parent.laplich.frm.Noidung4.value="";
					parent.laplich.frm.Thanhphan4.value="";
					parent.laplich.frm.Diadiem4.value="";
					parent.laplich.frm.Ghichu4.value="";
				}
				else{
					if (parent.laplich.frm.IDDK5.value==frm.ID.value){
						parent.laplich.frm.Thoigian5.value="";
						parent.laplich.frm.Thoigiankt5.value="";
						parent.laplich.frm.Noidung5.value="";
						parent.laplich.frm.Thanhphan5.value="";
						parent.laplich.frm.Diadiem5.value="";
						parent.laplich.frm.Ghichu5.value="";
					}
					else{
						if (parent.laplich.frm.IDDK6.value==frm.ID.value){
							parent.laplich.frm.Thoigian6.value="";
							parent.laplich.frm.Thoigiankt6.value="";
							parent.laplich.frm.Noidung6.value="";
							parent.laplich.frm.Thanhphan6.value="";
							parent.laplich.frm.Diadiem6.value="";
							parent.laplich.frm.Ghichu6.value="";
						}
						else{
							if (parent.laplich.frm.IDDK7.value==frm.ID.value){
								parent.laplich.frm.Thoigian7.value="";
								parent.laplich.frm.Thoigiankt7.value="";
								parent.laplich.frm.Noidung7.value="";
								parent.laplich.frm.Thanhphan7.value="";
								parent.laplich.frm.Diadiem7.value="";
								parent.laplich.frm.Ghichu7.value="";
							}
							else{
								if (parent.laplich.frm.IDDK8.value==frm.ID.value){
									parent.laplich.frm.Thoigian8.value="";
									parent.laplich.frm.Thoigiankt8.value="";
									parent.laplich.frm.Noidung8.value="";
									parent.laplich.frm.Thanhphan8.value="";
									parent.laplich.frm.Diadiem8.value="";
									parent.laplich.frm.Ghichu8.value="";
								}
								else{
									if (parent.laplich.frm.IDDK9.value==frm.ID.value){
										parent.laplich.frm.Thoigian9.value="";
										parent.laplich.frm.Thoigiankt9.value="";
										parent.laplich.frm.Noidung9.value="";
										parent.laplich.frm.Thanhphan9.value="";
										parent.laplich.frm.Diadiem9.value="";
										parent.laplich.frm.Ghichu9.value="";
									}
									else{
										if (parent.laplich.frm.IDDK10.value==frm.ID.value){
											parent.laplich.frm.Thoigian10.value="";
											parent.laplich.frm.Thoigiankt10.value="";
											parent.laplich.frm.Noidung10.value="";
											parent.laplich.frm.Thanhphan10.value="";
											parent.laplich.frm.Diadiem10.value="";
											parent.laplich.frm.Ghichu10.value="";
										}
										else{
											if (parent.laplich.frm.IDDK11.value==frm.ID.value){
												parent.laplich.frm.Thoigian11.value="";
												parent.laplich.frm.Thoigiankt11.value="";
												parent.laplich.frm.Noidung11.value="";
												parent.laplich.frm.Thanhphan11.value="";
												parent.laplich.frm.Diadiem11.value="";
												parent.laplich.frm.Ghichu11.value="";
											}
											else{
												if (parent.laplich.frm.IDDK12.value==frm.ID.value){
													parent.laplich.frm.Thoigian12.value="";
													parent.laplich.frm.Thoigiankt12.value="";
													parent.laplich.frm.Noidung12.value="";
													parent.laplich.frm.Thanhphan12.value="";
													parent.laplich.frm.Diadiem12.value="";
													parent.laplich.frm.Ghichu12.value="";
												}
												else{
													if (parent.laplich.frm.IDDK13.value==frm.ID.value){
														parent.laplich.frm.Thoigian13.value="";
														parent.laplich.frm.Thoigiankt13.value="";
														parent.laplich.frm.Noidung13.value="";
														parent.laplich.frm.Thanhphan13.value="";
														parent.laplich.frm.Diadiem13.value="";
														parent.laplich.frm.Ghichu13.value="";
													}
													else{
														if (parent.laplich.frm.IDDK14.value==frm.ID.value){
															parent.laplich.frm.Thoigian14.value="";
															parent.laplich.frm.Thoigiankt14.value="";
															parent.laplich.frm.Noidung14.value="";
															parent.laplich.frm.Thanhphan14.value="";
															parent.laplich.frm.Diadiem14.value="";
															parent.laplich.frm.Ghichu14.value="";
														}
														else{
															if (parent.laplich.frm.IDDK15.value==frm.ID.value){
																parent.laplich.frm.Thoigian15.value="";
																parent.laplich.frm.Thoigiankt15.value="";
																parent.laplich.frm.Noidung15.value="";
																parent.laplich.frm.Thanhphan15.value="";
																parent.laplich.frm.Diadiem15.value="";
																parent.laplich.frm.Ghichu15.value="";
															}
															else{
																if (parent.laplich.frm.IDDK16.value==frm.ID.value){
																	parent.laplich.frm.Thoigian16.value="";
																	parent.laplich.frm.Thoigiankt16.value="";
																	parent.laplich.frm.Noidung16.value="";
																	parent.laplich.frm.Thanhphan16.value="";
																	parent.laplich.frm.Diadiem16.value="";
																	parent.laplich.frm.Ghichu16.value="";
																}		
															}
														}
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
}
}
else{
i=i-1;
if (frm.chk(i).checked){
	if (parent.laplich.frm.Noidung1.value == "" ){
		parent.laplich.frm.Thoigian1.value=frm.Thoigian(i).value;
		parent.laplich.frm.Thoigiankt1.value=frm.Thoigiankt(i).value;
		parent.laplich.frm.Noidung1.value=frm.Noidung(i).value;
		parent.laplich.frm.Thanhphan1.value=frm.Thanhphan(i).value;
		parent.laplich.frm.Diadiem1.value=frm.Diadiem(i).value;
		parent.laplich.frm.Ghichu1.value=frm.Ghichu(i).value;			
		parent.laplich.frm.IDDK1.value=frm.ID(i).value;	
	}
	else
	{
		if (parent.laplich.frm.Noidung2.value == "" ){
			parent.laplich.frm.Thoigian2.value=frm.Thoigian(i).value;
			parent.laplich.frm.Thoigiankt2.value=frm.Thoigiankt(i).value;
			parent.laplich.frm.Noidung2.value=frm.Noidung(i).value;
			parent.laplich.frm.Thanhphan2.value=frm.Thanhphan(i).value;
			parent.laplich.frm.Diadiem2.value=frm.Diadiem(i).value;
			parent.laplich.frm.Ghichu2.value=frm.Ghichu(i).value;
			parent.laplich.frm.IDDK2.value=frm.ID(i).value;
		}
		else{
			if (parent.laplich.frm.Noidung3.value == "" ){
				parent.laplich.frm.Thoigian3.value=frm.Thoigian(i).value;
				parent.laplich.frm.Thoigiankt3.value=frm.Thoigiankt(i).value;
				parent.laplich.frm.Noidung3.value=frm.Noidung(i).value;
				parent.laplich.frm.Thanhphan3.value=frm.Thanhphan(i).value;
				parent.laplich.frm.Diadiem3.value=frm.Diadiem(i).value;
				parent.laplich.frm.Ghichu3.value=frm.Ghichu(i).value;
				parent.laplich.frm.IDDK3.value=frm.ID(i).value;
			}
			else{
				if (parent.laplich.frm.Noidung4.value == "" ){
					parent.laplich.frm.Thoigian4.value=frm.Thoigian(i).value;
					parent.laplich.frm.Thoigiankt4.value=frm.Thoigiankt(i).value;
					parent.laplich.frm.Noidung4.value=frm.Noidung(i).value;
					parent.laplich.frm.Thanhphan4.value=frm.Thanhphan(i).value;
					parent.laplich.frm.Diadiem4.value=frm.Diadiem(i).value;
					parent.laplich.frm.Ghichu4.value=frm.Ghichu(i).value;
					parent.laplich.frm.IDDK4.value=frm.ID(i).value;
				}
				else{
					if (parent.laplich.frm.Noidung5.value == "" ){
						parent.laplich.frm.Thoigian5.value=frm.Thoigian(i).value;
						parent.laplich.frm.Thoigiankt5.value=frm.Thoigiankt(i).value;
						parent.laplich.frm.Noidung5.value=frm.Noidung(i).value;
						parent.laplich.frm.Thanhphan5.value=frm.Thanhphan(i).value;
						parent.laplich.frm.Diadiem5.value=frm.Diadiem(i).value;
						parent.laplich.frm.Ghichu5.value=frm.Ghichu(i).value;
						parent.laplich.frm.IDDK5.value=frm.ID(i).value;
					}
					else{
						if (parent.laplich.frm.Noidung6.value == "" ){
							parent.laplich.frm.Thoigian6.value=frm.Thoigian(i).value;
							parent.laplich.frm.Thoigiankt6.value=frm.Thoigiankt(i).value;
							parent.laplich.frm.Noidung6.value=frm.Noidung(i).value;
							parent.laplich.frm.Thanhphan6.value=frm.Thanhphan(i).value;
							parent.laplich.frm.Diadiem6.value=frm.Diadiem(i).value;
							parent.laplich.frm.Ghichu6.value=frm.Ghichu(i).value;
							parent.laplich.frm.IDDK6.value=frm.ID(i).value;
						}
						else{
							if (parent.laplich.frm.Noidung7.value == "" ){
								parent.laplich.frm.Thoigian7.value=frm.Thoigian(i).value;
								parent.laplich.frm.Thoigiankt7.value=frm.Thoigiankt(i).value;
								parent.laplich.frm.Noidung7.value=frm.Noidung(i).value;
								parent.laplich.frm.Thanhphan7.value=frm.Thanhphan(i).value;
								parent.laplich.frm.Diadiem7.value=frm.Diadiem(i).value;
								parent.laplich.frm.Ghichu7.value=frm.Ghichu(i).value;
								parent.laplich.frm.IDDK7.value=frm.ID(i).value;
							}
							else{
								if (parent.laplich.frm.Noidung8.value == "" ){
									parent.laplich.frm.Thoigian8.value=frm.Thoigian(i).value;
									parent.laplich.frm.Thoigiankt8.value=frm.Thoigiankt(i).value;
									parent.laplich.frm.Noidung8.value=frm.Noidung(i).value;
									parent.laplich.frm.Thanhphan8.value=frm.Thanhphan(i).value;
									parent.laplich.frm.Diadiem8.value=frm.Diadiem(i).value;
									parent.laplich.frm.Ghichu8.value=frm.Ghichu(i).value;
									parent.laplich.frm.IDDK8.value=frm.ID(i).value;
								}
								else{
									if (parent.laplich.frm.Noidung9.value == "" ){
										parent.laplich.frm.Thoigian9.value=frm.Thoigian(i).value;
										parent.laplich.frm.Thoigiankt9.value=frm.Thoigiankt(i).value;
										parent.laplich.frm.Noidung9.value=frm.Noidung(i).value;
										parent.laplich.frm.Thanhphan9.value=frm.Thanhphan(i).value;
										parent.laplich.frm.Diadiem9.value=frm.Diadiem(i).value;
										parent.laplich.frm.Ghichu9.value=frm.Ghichu(i).value;
										parent.laplich.frm.IDDK9.value=frm.ID(i).value;
									}
									else{
										if (parent.laplich.frm.Noidung10.value == "" ){
											parent.laplich.frm.Thoigian10.value=frm.Thoigian(i).value;
											parent.laplich.frm.Thoigiankt10.value=frm.Thoigiankt(i).value;
											parent.laplich.frm.Noidung10.value=frm.Noidung(i).value;
											parent.laplich.frm.Thanhphan10.value=frm.Thanhphan(i).value;
											parent.laplich.frm.Diadiem10.value=frm.Diadiem(i).value;
											parent.laplich.frm.Ghichu10.value=frm.Ghichu(i).value;
											parent.laplich.frm.IDDK10.value=frm.ID(i).value;
										}
										else{
											if (parent.laplich.frm.Noidung11.value == "" ){
												parent.laplich.frm.Thoigian11.value=frm.Thoigian(i).value;
												parent.laplich.frm.Thoigiankt11.value=frm.Thoigiankt(i).value;
												parent.laplich.frm.Noidung11.value=frm.Noidung(i).value;
												parent.laplich.frm.Thanhphan11.value=frm.Thanhphan(i).value;
												parent.laplich.frm.Diadiem11.value=frm.Diadiem(i).value;
												parent.laplich.frm.Ghichu11.value=frm.Ghichu(i).value;
												parent.laplich.frm.IDDK11.value=frm.ID(i).value;
											}
											else{
												if (parent.laplich.frm.Noidung12.value == "" ){
													parent.laplich.frm.Thoigian12.value=frm.Thoigian(i).value;
													parent.laplich.frm.Thoigiankt12.value=frm.Thoigiankt(i).value;
													parent.laplich.frm.Noidung12.value=frm.Noidung(i).value;
													parent.laplich.frm.Thanhphan12.value=frm.Thanhphan(i).value;
													parent.laplich.frm.Diadiem12.value=frm.Diadiem(i).value;
													parent.laplich.frm.Ghichu12.value=frm.Ghichu(i).value;
													parent.laplich.frm.IDDK12.value=frm.ID(i).value;
												}
												else{
													if (parent.laplich.frm.Noidung13.value == "" ){
														parent.laplich.frm.Thoigian13.value=frm.Thoigian(i).value;
														parent.laplich.frm.Thoigiankt13.value=frm.Thoigiankt(i).value;
														parent.laplich.frm.Noidung13.value=frm.Noidung(i).value;
														parent.laplich.frm.Thanhphan13.value=frm.Thanhphan(i).value;
														parent.laplich.frm.Diadiem13.value=frm.Diadiem(i).value;
														parent.laplich.frm.Ghichu13.value=frm.Ghichu(i).value;
														parent.laplich.frm.IDDK13.value=frm.ID(i).value;
													}
													else{
														if (parent.laplich.frm.Noidung14.value == "" ){
															parent.laplich.frm.Thoigian14.value=frm.Thoigian(i).value;
															parent.laplich.frm.Thoigiankt14.value=frm.Thoigiankt(i).value;
															parent.laplich.frm.Noidung14.value=frm.Noidung(i).value;
															parent.laplich.frm.Thanhphan14.value=frm.Thanhphan(i).value;
															parent.laplich.frm.Diadiem14.value=frm.Diadiem(i).value;
															parent.laplich.frm.Ghichu14.value=frm.Ghichu(i).value;
															parent.laplich.frm.IDDK14.value=frm.ID(i).value;
														}
														else{
															if (parent.laplich.frm.Noidung15.value == "" ){
																parent.laplich.frm.Thoigian15.value=frm.Thoigian(i).value;
																parent.laplich.frm.Thoigiankt15.value=frm.Thoigiankt(i).value;
																parent.laplich.frm.Noidung15.value=frm.Noidung(i).value;
																parent.laplich.frm.Thanhphan15.value=frm.Thanhphan(i).value;
																parent.laplich.frm.Diadiem15.value=frm.Diadiem(i).value;
																parent.laplich.frm.Ghichu15.value=frm.Ghichu(i).value;
																parent.laplich.frm.IDDK15.value=frm.ID(i).value;
															}
															else{
																if (parent.laplich.frm.Noidung16.value == "" ){
																	parent.laplich.frm.Thoigian16.value=frm.Thoigian(i).value;
																	parent.laplich.frm.Thoigiankt16.value=frm.Thoigiankt(i).value;
																	parent.laplich.frm.Noidung16.value=frm.Noidung(i).value;
																	parent.laplich.frm.Thanhphan16.value=frm.Thanhphan(i).value;
																	parent.laplich.frm.Diadiem16.value=frm.Diadiem(i).value;
																	parent.laplich.frm.Ghichu16.value=frm.Ghichu(i).value;
																	parent.laplich.frm.IDDK16.value=frm.ID(i).value;
																}		
															}
														}
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
}
else{
	if (parent.laplich.frm.IDDK1.value==frm.ID(i).value){
		parent.laplich.frm.Thoigian1.value="";
		parent.laplich.frm.Thoigiankt1.value="";
		parent.laplich.frm.Noidung1.value="";
		parent.laplich.frm.Thanhphan1.value="";
		parent.laplich.frm.Diadiem1.value="";
		parent.laplich.frm.Ghichu1.value="";			
	}
	else
	{
		if (parent.laplich.frm.IDDK2.value==frm.ID(i).value){
			parent.laplich.frm.Thoigian2.value="";
			parent.laplich.frm.Thoigiankt2.value="";
			parent.laplich.frm.Noidung2.value="";
			parent.laplich.frm.Thanhphan2.value="";
			parent.laplich.frm.Diadiem2.value="";
			parent.laplich.frm.Ghichu2.value="";
		}
		else{
			if (parent.laplich.frm.IDDK3.value==frm.ID(i).value){
				parent.laplich.frm.Thoigian3.value="";
				parent.laplich.frm.Thoigiankt3.value="";
				parent.laplich.frm.Noidung3.value="";
				parent.laplich.frm.Thanhphan3.value="";
				parent.laplich.frm.Diadiem3.value="";
				parent.laplich.frm.Ghichu3.value="";
			}
			else{
				if (parent.laplich.frm.IDDK4.value==frm.ID(i).value){
					parent.laplich.frm.Thoigian4.value="";
					parent.laplich.frm.Thoigiankt4.value="";
					parent.laplich.frm.Noidung4.value="";
					parent.laplich.frm.Thanhphan4.value="";
					parent.laplich.frm.Diadiem4.value="";
					parent.laplich.frm.Ghichu4.value="";
				}
				else{
					if (parent.laplich.frm.IDDK5.value==frm.ID(i).value){
						parent.laplich.frm.Thoigian5.value="";
						parent.laplich.frm.Thoigiankt5.value="";
						parent.laplich.frm.Noidung5.value="";
						parent.laplich.frm.Thanhphan5.value="";
						parent.laplich.frm.Diadiem5.value="";
						parent.laplich.frm.Ghichu5.value="";
					}
					else{
						if (parent.laplich.frm.IDDK6.value==frm.ID(i).value){
							parent.laplich.frm.Thoigian6.value="";
							parent.laplich.frm.Thoigiankt6.value="";
							parent.laplich.frm.Noidung6.value="";
							parent.laplich.frm.Thanhphan6.value="";
							parent.laplich.frm.Diadiem6.value="";
							parent.laplich.frm.Ghichu6.value="";
						}
						else{
							if (parent.laplich.frm.IDDK7.value==frm.ID(i).value){
								parent.laplich.frm.Thoigian7.value="";
								parent.laplich.frm.Thoigiankt7.value="";
								parent.laplich.frm.Noidung7.value="";
								parent.laplich.frm.Thanhphan7.value="";
								parent.laplich.frm.Diadiem7.value="";
								parent.laplich.frm.Ghichu7.value="";
							}
							else{
								if (parent.laplich.frm.IDDK8.value==frm.ID(i).value){
									parent.laplich.frm.Thoigian8.value="";
									parent.laplich.frm.Thoigiankt8.value="";
									parent.laplich.frm.Noidung8.value="";
									parent.laplich.frm.Thanhphan8.value="";
									parent.laplich.frm.Diadiem8.value="";
									parent.laplich.frm.Ghichu8.value="";
								}
								else{
									if (parent.laplich.frm.IDDK9.value==frm.ID(i).value){
										parent.laplich.frm.Thoigian9.value="";
										parent.laplich.frm.Thoigiankt9.value="";
										parent.laplich.frm.Noidung9.value="";
										parent.laplich.frm.Thanhphan9.value="";
										parent.laplich.frm.Diadiem9.value="";
										parent.laplich.frm.Ghichu9.value="";
									}
									else{
										if (parent.laplich.frm.IDDK10.value==frm.ID(i).value){
											parent.laplich.frm.Thoigian10.value="";
											parent.laplich.frm.Thoigiankt10.value="";
											parent.laplich.frm.Noidung10.value="";
											parent.laplich.frm.Thanhphan10.value="";
											parent.laplich.frm.Diadiem10.value="";
											parent.laplich.frm.Ghichu10.value="";
										}
										else{
											if (parent.laplich.frm.IDDK11.value==frm.ID(i).value){
												parent.laplich.frm.Thoigian11.value="";
												parent.laplich.frm.Thoigiankt11.value="";
												parent.laplich.frm.Noidung11.value="";
												parent.laplich.frm.Thanhphan11.value="";
												parent.laplich.frm.Diadiem11.value="";
												parent.laplich.frm.Ghichu11.value="";
											}
											else{
												if (parent.laplich.frm.IDDK12.value==frm.ID(i).value){
													parent.laplich.frm.Thoigian12.value="";
													parent.laplich.frm.Thoigiankt12.value="";
													parent.laplich.frm.Noidung12.value="";
													parent.laplich.frm.Thanhphan12.value="";
													parent.laplich.frm.Diadiem12.value="";
													parent.laplich.frm.Ghichu12.value="";
												}
												else{
													if (parent.laplich.frm.IDDK13.value==frm.ID(i).value){
														parent.laplich.frm.Thoigian13.value="";
														parent.laplich.frm.Thoigiankt13.value="";
														parent.laplich.frm.Noidung13.value="";
														parent.laplich.frm.Thanhphan13.value="";
														parent.laplich.frm.Diadiem13.value="";
														parent.laplich.frm.Ghichu13.value="";
													}
													else{
														if (parent.laplich.frm.IDDK14.value==frm.ID(i).value){
															parent.laplich.frm.Thoigian14.value="";
															parent.laplich.frm.Thoigiankt14.value="";
															parent.laplich.frm.Noidung14.value="";
															parent.laplich.frm.Thanhphan14.value="";
															parent.laplich.frm.Diadiem14.value="";
															parent.laplich.frm.Ghichu14.value="";
														}
														else{
															if (parent.laplich.frm.IDDK15.value==frm.ID(i).value){
																parent.laplich.frm.Thoigian15.value="";
																parent.laplich.frm.Thoigiankt15.value="";
																parent.laplich.frm.Noidung15.value="";
																parent.laplich.frm.Thanhphan15.value="";
																parent.laplich.frm.Diadiem15.value="";
																parent.laplich.frm.Ghichu15.value="";
															}
															else{
																if (parent.laplich.frm.IDDK16.value==frm.ID(i).value){
																	parent.laplich.frm.Thoigian16.value="";
																	parent.laplich.frm.Thoigiankt16.value="";
																	parent.laplich.frm.Noidung16.value="";
																	parent.laplich.frm.Thanhphan16.value="";
																	parent.laplich.frm.Diadiem16.value="";
																	parent.laplich.frm.Ghichu16.value="";
																}		
															}
														}
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
}
}
}
</script>
<BODY topmargin=0 leftmargin=0 bgcolor=#f8f9d9>
<form name=frm method=post>
<center>
<table>
	<TR>
		<TD>
			<font face='Time New Roman' color=blue><strong>Danh sách đăng ký lịch làm việc của Cục (<%=Thu(bdate)%>&nbsp;<%=FormatDate(bdate)%>)</strong></font>
		</TD>
	</TR>
</Table>
</center>
<table border="0" cellpadding="0" cellSpacing="0" width="100%" bgColor="#EEEECC">
	<%
	stt=1
	Set RecDKLich=server.CreateObject("ADODB.Recordset")
	RecDKLich.CursorType=3
	RecDkLich.CacheSize=5
	sSQL="select *,(select id from lichcongtac where ngaythang='"& bdate &"' and madonvi='000000' and iddk=dklich.id) as idlct from dklich where ngaydangky='"& bdate &"' and ttdv=1 order by thoigian,thoigiankt,noidung"
	RecDKLich.Open sSQL,Conn
	intsumrecord=RecDKLich.recordcount
	Do while Not RecDKLich.EOF
	%>
	<TR>
		<TD width="2%" align="ceneter"><INPUT type="hidden" name=ID value="<%=RecDKLich("ID")%>">
		<%if isnull(RecDKLich("idlct")) then%>
			<INPUT TYPE="checkbox" NAME="chk" LANGUAGE=javascript onclick="return chk_onclick(<%=stt%>,<%=intsumrecord%>)">
		<%else%>
			<INPUT TYPE="checkbox" NAME="chk" checked LANGUAGE=javascript onclick="return chk_onclick(<%=stt%>,<%=intsumrecord%>)">
		<%end if%>
		</TD>
		<TD width="5%"><INPUT readonly="true" name=Thoigian value="<%=RecDKLich("thoigian")%>" size=5 maxlength=5 style="text-align:center;FONT-FAMILY: Time New Roman;border: 1px solid #C0C0C0"></TD>
		<TD width="5%"><INPUT readonly="true" name=Thoigiankt value="<%=RecDKLich("thoigiankt")%>" size=5 maxlength=5 style="text-align:center;FONT-FAMILY: Time New Roman;border: 1px solid #C0C0C0"></TD>
		<TD width="22%"><INPUT readonly="true" name=Noidung value="<%=RecDKLich("noidung")%>" size=26 style="FONT-FAMILY: Time New Roman;border: 1px solid #C0C0C0"></TD>
		<TD width="22%"><INPUT readonly="true" name=Thanhphan value="<%=RecDKLich("thanhphan")%>" size=26 style="FONT-FAMILY: Time New Roman;border: 1px solid #C0C0C0"></TD>
		<TD width="22%"><INPUT readonly="true" name=Diadiem value="<%=RecDKLich("diadiem")%>" size=26 style="FONT-FAMILY: Time New Roman;border: 1px solid #C0C0C0"></TD>
		<TD width="22%"><INPUT readonly="true" name=Ghichu value="<%=RecDKLich("ghichu")%>" size=25 style="FONT-FAMILY: Time New Roman;border: 1px solid #C0C0C0"></TD>
	</TR>
	<%
	stt=stt+1
	RecDKLich.MoveNext
	loop
	RecDKLich.close
	set RecDKLich=nothing
	%>
</TABLE>
</form>
</BODY>
</HTML>
<%
	Conn.Close
	Set Conn=nothing
%>
</HTML>